package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.DatBasesiteMapper;
import com.rzl.expense.expense.domain.DatBasesite;
import com.rzl.expense.expense.service.IDatBasesiteService;

/**
 * 站点信息Service业务层处理
 * 
 * @author expense
 * @date 2025-02-22
 */
@Service
public class DatBasesiteServiceImpl implements IDatBasesiteService 
{
    @Autowired
    private DatBasesiteMapper datBasesiteMapper;

    /**
     * 查询站点信息
     * 
     * @param basesiteId 站点信息主键
     * @return 站点信息
     */
    @Override
    public DatBasesite selectDatBasesiteByBasesiteId(String basesiteId)
    {
        return datBasesiteMapper.selectDatBasesiteByBasesiteId(basesiteId);
    }

    /**
     * 查询站点信息列表
     * 
     * @param datBasesite 站点信息
     * @return 站点信息
     */
    @Override
    public List<DatBasesite> selectDatBasesiteList(DatBasesite datBasesite)
    {
        return datBasesiteMapper.selectDatBasesiteList(datBasesite);
    }

    /**
     * 新增站点信息
     * 
     * @param datBasesite 站点信息
     * @return 结果
     */
    @Override
    public int insertDatBasesite(DatBasesite datBasesite)
    {
        datBasesite.setCreateTime(DateUtils.getNowDate());
        return datBasesiteMapper.insertDatBasesite(datBasesite);
    }

    /**
     * 修改站点信息
     * 
     * @param datBasesite 站点信息
     * @return 结果
     */
    @Override
    public int updateDatBasesite(DatBasesite datBasesite)
    {
        datBasesite.setUpdateTime(DateUtils.getNowDate());
        return datBasesiteMapper.updateDatBasesite(datBasesite);
    }

    /**
     * 批量删除站点信息
     * 
     * @param basesiteIds 需要删除的站点信息主键
     * @return 结果
     */
    @Override
    public int deleteDatBasesiteByBasesiteIds(String[] basesiteIds)
    {
        return datBasesiteMapper.deleteDatBasesiteByBasesiteIds(basesiteIds);
    }

    /**
     * 删除站点信息信息
     * 
     * @param basesiteId 站点信息主键
     * @return 结果
     */
    @Override
    public int deleteDatBasesite(String[] currentDate)
    {
        return datBasesiteMapper.deleteDatBasesite(currentDate[0],currentDate[1]);
    }




    @Override
    public void batchDatBasesite(List<DatBasesite> list)
    {

         datBasesiteMapper.batchDatBasesite(list);
    }


}
